package com.zhaoyuxi.topic;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RabbitListener(queues = "zyxTopic2")
public class TopicCunsumer2 {

    @RabbitHandler
    public void getMessage(String message){
        System.out.println(message);
        log.info("zyxTopic2:"+"接收的信息为"+message);
    }
}
